
<!-- 待删除界面 ，测试所用-->
<body>
<form action="__URL__/submit" enctype="multipart/form-data" method="post" >
	<div>
		<input name="goodname" placeholder="商品名"/><br>
		<input name="desc" placeholder="商品描述"/><br>
		<input name="place" placeholder="产地"/><br>
		<input name="expressplace" placeholder="发货地"/>
	</div>
	<div class="item">
		<button type='button' class='delete'>删除</button><br>
		<input name="number[]" placeholder="价格"/><br>
		<input name="item_id[]" placeholder="名称"/><br>
		<hr>
	</div>
		<button type='button' id='add'>添加</button>
		<input type="submit" value="提交" >
	</form>
<body>
<include file="layout/footer" />
<script type="text/javascript">	

	$('document').ready(function(){
		
		$('body').delegate('.delete','click',function(){
			var button = $(this);
			if($('.item').size()>1)
				button.parent().remove();
		});

		$('#add').click(function(){
			$('.item').last().after($('.item').first().prop('outerHTML'));
		});		

		$('#addPic').click(function(){
			$('.pic').last().after($('.pic').first().prop('outerHTML'));
		});
		
	});
</script>